<?php

class Table
{
   private $_name;
   private $_fields;
   

   function __construct($n, $f)
   {
      $this->_name=$n;
      $this->_fields=$f;
   }   
   

   public function getName()
   {
      return $this->_name;
   }
   

   public function getFields()
   {
      return $this->_fields;
   }


   public function close()
   {
      unset($this->_name);
      unset($this->_fields);
      unset($this);
   }

   public function getFieldsAsString()
   {
      $fstring = "(";
      foreach($this->_fields as $field)
      {
         if (next($this->_fields))
         {
            $fstring."$field,";
         }
         else 
         {
            $fstring."$field";
         }
      }
      return $fstring.")";
   }

}
?>